package pers.qianyu.module.system.listener.events;

import org.springframework.context.ApplicationEvent;

import java.io.Serializable;
import java.util.List;

/**
 * 用户信息中 ids 字段更新事件
 *
 * @author mizzle rain
 * @date 2021-03-18 18:43
 */
public class UserInfoIdsUpdatedEvent extends ApplicationEvent implements Serializable {
    private static final long serialVersionUID = 892589075637794693L;
    private List<Long> ids;
    private Long userId;
    private Type type;

    public static enum Type {
        IMAGE_LIKE_IDS_UPDATED,
        IMAGE_COLLECTION_IDS_UPDATED;
    }

    public UserInfoIdsUpdatedEvent(Object source, List<Long> ids, Long userId, Type type) {
        super(source);
        this.ids = ids;
        this.userId = userId;
        this.type = type;
    }

    public List<Long> getIds() {
        return ids;
    }

    public void setIds(List<Long> ids) {
        this.ids = ids;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Type getType() {
        return type;
    }

    public void setType(Type type) {
        this.type = type;
    }
}
